-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Location access via JavaScript #28
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
joemasilotti
commented
Apr 5, 2024
demo/src/main/kotlin/dev/hotwire/demo/features/web/WebFragment.kt
Outdated
Show resolved
Hide resolved
joemasilotti
commented
Apr 5, 2024
demo/src/main/kotlin/dev/hotwire/demo/features/web/WebFragment.kt
Outdated
Show resolved
Hide resolved
* main: Present better looking Material dialogs for WebView alert and confirm dialogs Allow camera capture by default if the accept type explicitly allows images
* main: (63 commits) Update to the latest gradle plugin Include Turbo Native Android in the user agent substring for backwards compatibilty with existing apps Change Turbo Native to Hotwire Native in user agent. Update HotwireNavigation.kt Remove old docs Update README.md Revert "Add repositories to each build script" Add repositories to each build script Disable the gradle configuration cache due to incompatibility with the signing plugin Add the signing plugin Add Sonatype (Maven Central) publishing support Readme updates Add publishing build script for the navigation-fragments module Remove Strada references Update demo site url Update android plugin dependencies Update CI workflow actions Update logo filename Update raster launcher icon Update vector launcher icon ... # Conflicts: # demo/src/main/kotlin/dev/hotwire/demo/features/web/WebFragment.kt
… the HotwireWebChromeClient if the app has declared location permission(s) are declared in the app manifest.
…e permission with the WebView
* main: Fix dialog fragment navigation issues. This fixes regressions when refactoring the Navigator to use a single instance across a navigation host. The topmost DialogFragment is not available from the NavigatorHost.childFragmentManager, since it is added directly to the Activity's window instead. Fix tests Fix lifecycle crash/timing issues when the Activity is recreated (such as during config changes) Add API doc Allow an app to check whether a navigator or its host are ready for navigation Provide the WebView system information in an easy to access way.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR configures the web view and
WebFragment
to access the user's location via JavaScript.The first time the user's location is accessed the following appears:
If accepted,
WebFragment
reloads the page. When the location is accessed a second time the following appears:If the permissions in the manifest file are commented out the following appears when accessing the user's location:
Note that this only works against HTTPS websites, so you will need to tunnel via ngrok for Chrome to expose the user's location.
The following Stimulus controller was used to test the location access: